package IC.AST;

import java.util.LinkedList;

public class Fields extends FieldsOrMethod
{
	private LinkedList<ClassField> _fieldsList;
	private Type _type; 
	
	public Object Visit(Visitor visitor) { return null; } //no code here, because it's not in the AST
	
	/**
	 * 
	 * @param lastLine
	 * @param type
	 * @param idsList != null
	 */
	public Fields (Interval interval, Type type, LinkedList<ClassField> idsList)
	{
		super(interval);
		GiveBirth(type);
		_type = type;
		_fieldsList = ((idsList == null) ? new LinkedList<ClassField>() : idsList);
		for (ClassField id : _fieldsList)
			GiveBirth(id);
	}
	
	public Type GetASTType() { return _type; }
	public LinkedList<ClassField> GetIds() { return _fieldsList; }

}
